<template>
	<view class="content">
		<image class="tu" src="/static/1.jpg" mode="widthFix"></image>
		<view class="btn" style="">
			<button type="primary" @click="getData">点击跳转</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				inviter: '',
				title:''
			}
		},   
		onLoad(e) {
			console.log(e);
			this.inviter = e.inviter;
		},
		methods: {
			getData() {
				uni.request({
					url: 'https://magic.chaoliandz.com/miniapp/url',
					// url: 'https://cl-api.cxycoder.com/miniapp/url',
					method: 'POST',
					data: {
						path: 'pages/index/index',
						query: 'inviter='+this.inviter,
				   },
					success: res => {
						// console.log(res.data.data.url);
						window.location.href  = res.data.data.url;
						// this.title = res.data.data.url;
					},
					fail: () => {},
					complete: () => {}
				});
				
				
			}
		}
	}
</script>

<style>
	page {
		/* height: 100%; */
	}
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		/* height: 100%; */
	}
	.tu {
		width: 100%;
		/* height: 100%; */
	}
	.btn {
		position: fixed; 
		bottom: 100rpx; 
		width: 95%;
		
	}
	
</style>